package com.yc.controller.xcx;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.yc.controller.weixin.GenericController;
import com.yc.service.xcx.user.IXCXUserService;
import com.yc.util.ReturnModel;

@Controller
@RequestMapping("/app")
public class EUserAccessController extends GenericController {

	@Resource
	private IXCXUserService xCXUserService;
	
	
	@RequestMapping(value = "/getAccessToken")
    public void getAccessToken(HttpServletResponse response, @RequestParam(value = "code") String code) {
        	
        	ReturnModel returnModel = xCXUserService.getAccessToken(code);
            renderString(response, returnModel);
       
    }
}
